#include <stdio.h>

void fun(char *s, int *a, int *b, int *c) {
	*a = *b = *c = 0;
	for (; *s != 0; s++) {
		if (*s >= 'a' && *s <= 'z' || *s >= 'A' && *s <= 'Z') (*a)++;
		else if (*s >= '0' && *s <= '9') (*b)++;
		else (*c)++;
	}
}

int main() {
	char s[256];
	int a, b, c;
	scanf("%s", s);
	fun(s, &a, &b, &c);
	printf("%d %d %d\n", a, b, c);
	
	return 0;
}
